package com.wisdudu.blank.ui.login;

import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.wisdudu.blank.R;
import com.wisdudu.blank.databinding.FragmentForgetPassBinding;
import com.wisdudu.frame.base.BaseFragment;

/**
 * Created by ypp on 2016/5/11.
 */
public class ForgetPasswordFragment extends BaseFragment {

    private FragmentForgetPassBinding mBinding;
    private ForgetPasswordVM forgetPasswordVM;

    @Override
    protected View initBinding(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        mBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_forget_pass, container, false);
        forgetPasswordVM = new ForgetPasswordVM(this, mBinding);
        mBinding.setViewModel(forgetPasswordVM);
        return mBinding.getRoot();
    }

    @Override
    public void onViewCreated(View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        initToolbar(getToolbar(), "获取验证码");
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        forgetPasswordVM.setTimeCancel();
    }
}
